package org.example.responsibilitychain;

/**
 * @author wangbin
 * @date 2024/4/20
 * @vesion 1.0
 */
public class CollegeApprover extends Approver{
    public CollegeApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {

        if(purchaseRequest.getPrice()>=5000&&purchaseRequest.getPrice()<=100000){
            System.out.println("CollegeApprover = " + purchaseRequest.getId()+this.getName());
        }else{
            approver.processRequest(purchaseRequest);
        }

    }
}
